package com.star.rpc.registry;

import com.star.rpc.modal.ServiceMetaInfo;

import java.util.List;

/**
 * packageName com.star.rpc.registry
 *
 * @author zerostart
 * @className RegistryServiceCache
 * @date 2024/11/26
 * @description  注册中心本地缓存
 */
public class RegistryServiceCache {
    /**
     * 服务缓存
     */
    List<ServiceMetaInfo> serviceCache;


    /**
     * 写缓存
     */
    void writeCache(List<ServiceMetaInfo> newServiceCache) {
        this.serviceCache = newServiceCache;
    }

    /**
     * 读缓存
     */

    List<ServiceMetaInfo> readCache() {
        return this.serviceCache;
    }


    void clearCache() {
        this.serviceCache = null;
    }



}
